package cn.wolfcode.wolf2w.business.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.wolfcode.wolf2w.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 提问信息对象 ta_question
 * 
 * @author libai
 * @date 2024-08-10
 */
@Data
//@Accessors(chain = true)
@TableName("ta_question")
@ApiModel(value = "问题实体类", description = "提问问题")
public class Question implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键 */
    @ApiModelProperty(example = "0", value = "问题主键", name = "id", dataType = "Long", required = true)
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 问题标题 */
    @ApiModelProperty(value = "问题标题", name = "title", dataType = "String", required = true)
    @Excel(name = "问题标题")
    private String title;


    /** 浏览量 */
    @ApiModelProperty(example = "0", value = "问题浏览量", name = "viewnum", dataType = "Long", required = true)
    @Excel(name = "浏览量")
    private Long viewnum;

    /** 点赞量 */
    @ApiModelProperty(example = "0", value = "问题点赞量", name = "thumbsupnum", dataType = "Long", required = true)
    @Excel(name = "点赞量")
    private Long thumbsupnum;

    /** 收藏(关注)量 */
    @ApiModelProperty(example = "0", value = "问题收藏量", name = "starnum", dataType = "Long", required = true)
    @Excel(name = "收藏(关注)量")
    private Long starnum;

    /** 回答量 */
    @ApiModelProperty(example = "0", value = "问题回答量", name = "replynum", dataType = "Long", required = true)
    @Excel(name = "回答量")
    private Long replynum;

    /** 状态 -2 关闭 -1 删除 0 草稿 1 已发布 */
    @ApiModelProperty(example = "0", value = "问题状态", name = "state", dataType = "Long", required = true)
    @Excel(name = "状态")
    private Long state;

    /** 目的地 */
    @ApiModelProperty(example = "0", value = "问题目的地id", name = "destId", dataType = "Long", required = true)
    @Excel(name = "目的地")
    private Long destId;

    /** 用户 */
    @ApiModelProperty(example = "0", value = "问题作者id", name = "authorId", dataType = "Long", required = true)
    @Excel(name = "作者id")
    private Long authorId;

    /** 问题质量分数 */
    @ApiModelProperty(example = "0", value = "问题质量分数", name = "qualityScore", dataType = "Long", required = true)
    @Excel(name = "问题质量分数")
    private Long qualityScore;

    /** 发表时间 */
    @ApiModelProperty( value = "问题发表时间", name = "qualityScore", dataType = "Date", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    /** 修改时间 */
    @ApiModelProperty( value = "问题修改时间", name = "updateTime", dataType = "Date", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date updateTime;

    /** 已采纳的回答 */
    @ApiModelProperty( value = "已采纳的回答", name = "goodCommentId", dataType = "String", required = true)
    @Excel(name = "已采纳的回答")
    private String goodCommentId;


    @ApiModelProperty( value = "问题照片", name = "img", dataType = "String", required = true)
    @Excel(name = "照片")
    private String img;



    @ApiModelProperty( value = "问题主要详情内容", name = "detailDoubt", dataType = "String", required = true)
    @Excel(name = "问题详情")
    private String detailDoubt;


    @ApiModelProperty( value = "问题目的地名字", name = "destinationName", dataType = "String", required = true)
    @TableField(exist = false)
    @Excel(name = "目的地名字")
    private String destinationName;


    /** 问题内容 */
    @ApiModelProperty( value = "问题内容", name = "contents", dataType = "String", required = true)
    @Excel(name = "问题内容")
    @TableField(exist = false)
    private String contents;

    @ApiModelProperty( value = "问题作者名字", name = "authorName", dataType = "String", required = true)
    @TableField(exist = false)
    private String authorName;

    @ApiModelProperty( value = "问题作者等级", name = "level", dataType = "String", required = true,example = "0")
    @TableField(exist = false)
    private Integer level;

    @ApiModelProperty( value = "问题作者头像", name = "headImgUrl", dataType = "String", required = true)
    @TableField(exist = false)
    private String headImgUrl;

    @TableField(exist = false)
    private List<Answer> answerList = new ArrayList<>();




}
